#check database connection
#db_ipport=$1
gpp_host=$1
gpp_pwd=$2

#reset encpwd
sys_encpwd -H \* -P \* -D \* -U gpp  		     -W  ${gpp_pwd}
c1=`ksql "host=${gpp_host} port=54321 user=gpp dbname=GPPDB" -t -c "select version()" `;

#

if [ `echo $c1 | grep -i 'Kingbase' |wc -l` != 1 ]; then
   echo "ERROR: Check $c1 password is wrong."
else
   echo 0
fi;






